package com.wrl.design.pattern.creational.simplefactory;

/**
 * 简单工厂
 *
 * @author Wang Renlei
 * @Date 2019/11/12 0012
 */
public class Test {

    public static void main(String[] args) {
//        VideoFactory videoFactory = new VideoFactory();
//        Video java = videoFactory.getVideo("Java");
//        if(java == null){
//            return;
//        }
//        java.product();

        VideoFactory videoFactory = new VideoFactory();
        Video java = videoFactory.getVideo(PythonVideo.class);
        if(java == null){
            return;
        }
        java.product();

    }

}
